import Layout from '@/layout'
// 动态路由
export const asyncRoutes = [
// 工单管理页面
  {
    path: '/salarys',
    component: Layout,
    meta: { title: '工单管理', icon: 'skill' },
    children: [
      {
        path: '/Run',
        name: 'Run',
        component: () => import('@/views/Salary/component/Run'),
        meta: { title: '运营工单' }
      },
      {
        path: '/Maintenance', // 如果children path置空的话 当前这个路由会作为一级渲染的默认路由
        name: 'Maintenance',
        component: () => import('@/views/Salary/component/Maintenance'),
        meta: { title: '运维工单' }
      }]
  },
  // 点位管理
  {
    path: '/Point',
    component: Layout,
    meta: { title: '点位管理', icon: 'el-icon-map-location' },
    children: [
      {
        path: '/zone',
        name: 'zone',
        component: () => import('@/views/Point/component/zone'),
        meta: { title: '区域管理' }
      },
      {
        path: '/PT', // 如果children path置空的话 当前这个路由会作为一级渲染的默认路由
        name: 'PT',
        component: () => import('@/views/Point/component/PT'),
        meta: { title: '点位管理' }
      },
      {
        path: '/Partners', // 如果children path置空的话 当前这个路由会作为一级渲染的默认路由
        name: 'Partners',
        component: () => import('@/views/Point/component/Partners'),
        meta: { title: '合作商管理' }
      }]
  },
  // 设备管理
  {
    path: '/equipment',
    component: Layout,
    meta: { title: '设备管理', icon: 'el-icon-set-up' },
    children: [
      {
        path: '/equipmentSon',
        name: 'equipmentSon',
        component: () => import('@/views/equipment/component/equipmentSon'),
        meta: { title: '设备管理' }
      },
      {
        path: '/condition', // 如果children path置空的话 当前这个路由会作为一级渲染的默认路由
        name: 'condition',
        component: () => import('@/views/equipment/component/condition'),
        meta: { title: '设备状态' }
      },
      {
        path: '/type', // 如果children path置空的话 当前这个路由会作为一级渲染的默认路由
        name: 'type',
        component: () => import('@/views/equipment/component/type'),
        meta: { title: '设备类型管理' }
      }]
  },
  // 人员管理
  {
    path: '',
    component: Layout,
    meta: { title: '人员管理', icon: 'el-icon-s-custom' },
    children: [
      {
        path: '/list',
        name: 'list',
        component: () => import('@/views/personnel/component/list'),
        meta: { title: '人员列表' }
      },
      {
        path: '/statistics', // 如果children path置空的话 当前这个路由会作为一级渲染的默认路由
        name: 'statistics',
        component: () => import('@/views/personnel/component/statistics'),
        meta: { title: '人效统计' }
      },
      {
        path: '/workload', // 如果children path置空的话 当前这个路由会作为一级渲染的默认路由
        name: 'workload',
        component: () => import('@/views/personnel/component/workload'),
        meta: { title: '工作量列表' }
      }]
  },
  // 商品管理
  {
    path: '/goods',
    component: Layout,
    meta: { title: '商品管理', icon: 'el-icon-s-ticket' },
    children: [
      {
        path: '/commodityType',
        name: 'commodityType',
        component: () => import('@/views/goods/component/commodityType'),
        meta: { title: '商品类型' }
      },
      {
        path: '/manage', // 如果children path置空的话 当前这个路由会作为一级渲染的默认路由
        name: 'manage',
        component: () => import('@/views/goods/component/manage'),
        meta: { title: '商品管理' }
      }
    ]
  },
  // 策略管理
  {
    path: '/tactics',
    component: Layout,
    children: [{
      path: '',
      name: 'tactics',
      component: () => import('@/views/tactics/index'),
      meta: { title: '策略管理', icon: 'el-icon-s-opportunity' }
    }]
  },
  // 订单管理
  {
    path: '/Order',
    component: Layout,
    children: [{
      path: '',
      name: 'Order',
      component: () => import('@/views/Order/index'),
      meta: { title: '订单管理', icon: 'el-icon-document-copy' }
    }]
  },
  // 对账统计
  {
    path: '/CheckAccounts',
    component: Layout,
    children: [{
      path: '',
      name: 'CheckAccounts',
      component: () => import('@/views/CheckAccounts/index'),
      meta: { title: '对账统计', icon: 'el-icon-coin' }
    }]
  }
]
